/*****************************************************************************************
Arise Engine		LineDebug.h

					E-mail:		arise_engine@mail.ru

					Origin by:	DK Engine 0.019,
								KAIN (igor@donec.net), Agressor (agress0r@mail.ru)

created:			02.01.2004
last changes:		29.04.2007
*****************************************************************************************/
#pragma once

#include "..\renderer\RendererD3D9.h"


class LineDebug
{
private:

	LPDIRECT3DDEVICE9			m_device;
	LPDIRECT3DVERTEXBUFFER9		m_vertex_buffer;
	std::vector<D3DXVECTOR3>	m_lines_list;	
	VertexDebug*				m_vertex_array;
	bool						m_is_inited;

public:
	LineDebug();
	LineDebug(const D3DXVECTOR3 &center, float width);
	~LineDebug();

	void AddDebugRectangle(const D3DXVECTOR3 &center, float width);
	void AddLine(const D3DXVECTOR3 &point1, const D3DXVECTOR3 &point2);
	bool InitVertexBuffer(LPDIRECT3DDEVICE9 device);
	void Render(LPDIRECT3DDEVICE9 device = 0);	
	void Release();

	void SetDevice(LPDIRECT3DDEVICE9 device){m_device = device;}

};

